export default {
	namespaced: true,
	state: () => ({
		// 收货地址
		address: JSON.parse(uni.getStorageSync('address') || '{}')
	}),
	mutations: {
		// 更新收货地址
		updateAddress(state, address) {
			state.address = address
			uni.setStorageSync('address', JSON.stringify(address))
		}
	},
	getters: {
		dzStr(state) {
			return `${state.address.provinceName}${state.address.cityName}${state.address.countyName}${state.address.detailInfo}`
		}
	}
}